package net.wanho.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author：汤小洋
 * Date：2023-11-13 14:57
 * Description：<描述>
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/list")
    @PreAuthorize("hasAuthority('sys:user:list')")
    public String list() {
        return "user list";
    }

    @GetMapping("/add")
    @PreAuthorize("hasAuthority('sys:user:add')")
    public String add() {
        return "user add";
    }

}
